var currentQueueIndex = 0;

// Cloud Types: CSS name, Speed, Initial Speed
CloudTypes = new Array(2)
CloudTypes[0] = ["_big", 800000, 800000];
CloudTypes[1] = ["_small", 800000, 800000];
CloudTypes[2] = ["_medium", 800000, 800000];


$(document).ready(function(){

	// Start the cloud movement
	for (i = 0; i < CloudTypes.length; ++ i) {
		moveCloud(CloudTypes[i][0], CloudTypes[i][1], CloudTypes[i][2]);
	}

});

// Cloud movement
function moveCloud(id, speed, initialspeed) {
	if (parseInt($("#cloud" + id).css("left")) == 100) {
		// Second or + movement, final speed
		thisspeed = initialspeed;
	} else {
		// First time it's moving, so start at initial speed\
		$("#cloud" + id).css("left", "-1000%");
		thisspeed = initialspeed;
	}
		
	$("#cloud" + id).animate({left:"100%"}, thisspeed, "linear");
	/* setTimeout("moveCloud('" + id + "', "+speed+")", thisspeed); */
}
